<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<c:if test="${not empty statusMessageKey}">
    <p><c:out value="${statusMessageKey}"/></p>
</c:if>

<c:if test="${not empty list}">
<ul>
<c:forEach var="lot" items="${list}">
	<li><c:out value="${lot.title}"/></li>
</c:forEach>
</ul>
</c:if>

<div>
<form:form action="/lot/save" commandName="lot">
    <fieldset style="display: table;">
        <div class="form-row" style="display: table-row;">
            <label for="name">Title:</label>
            <span class="input"><form:input path="title" /></span>
        </div>
        <div class="form-row" style="display: table-row;">
            <label for="name">Comment:</label>
            <span class="input"><form:textarea path="comment" /></span>
        </div>
        <div class="form-row" style="display: table-row;">
            <label for="name">Price:</label>
            <span class="input"><form:input path="price" /></span>
        </div>
        <div class="form-row" style="display: table-row;">
            <label for="name">Number Ticket:</label>
            <span class="input"><form:input path="numberTicket" /></span>
        </div>
        <div class="form-row" style="display: table-row;">
            <label for="name">Day Lot:</label>
            <span class="input"><form:select path="whenDayLot">
            	<form:options items="${dayLot}" itemValue="key" itemLabel="value"/>
            </form:select></span>
        </div>
        <div class="form-row" style="display: table-row;">
            <label for="name">Number Lot:</label>
            <span class="input"><form:select path="whatNumberLot">
            	<form:options items="${numberLot}" itemValue="key" itemLabel="value"/>
            </form:select></span>
        </div>
        <div class="form-buttons">
            <div class="button"><input name="submit" type="submit" value="Guardar"/></div>
        </div>
    </fieldset>
</form:form>
</div>